LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-05-2017, 01:04 AM   #1
Glenn D.
Member
 
Registered: May 2009
Location: ACT - Australia
Distribution: Opensuse x86_64 (Latest)
Posts: 132

Rep: Reputation: 26
What tools or commands can be used to truncate a reiser4 partition past the {last used block + 1} ?


Hello,

# q01- What tools or commands [command line] can be used to truncate a reiser4 partition past the {last used block + 1} ?

Reason for asking:
Want to use free space for another partition.

Thanks for the help.
using opensuse 64 bit

Thanks
--Glenn

What has been found.

# df -h

Filesystem Size Used Avail Use% Mounted on
/dev/sdb2 311G 109G 203G 35% /media/disk2


It shows 35% Used space out of all usable space.

# umount /dev/sdb2

-last used block

# debugfs.reiser4 /dev/sdb2 --print-nodes r4files-sdb.tgz |grep -i
"UNITS=" | cut -c12- | sed 's/ /\n/g' | cut -d"(" -f1 |tail
debugfs.reiser4 1.1.0
Format release: 4.0.1
Copyright (C) 2001-2005 by Hans Reiser, licensing governed by
reiser4progs/COPYING.

28120225
28152961
28185697
28187399
28218433
28251169
28283905
28316641
28349377
28382113


# debugfs.reiser4 /dev/sdb2 --print-super
debugfs.reiser4 1.1.0
Format release: 4.0.1
Copyright (C) 2001-2005 by Hans Reiser, licensing governed by
reiser4progs/COPYING.

Master super block (16):
magic: ReIsEr4
blksize: 4096
format: 0x0 (format40)
uuid: 139d06a8-1886-44a0-a058-8f9da1ab88cf
label: <none>

Format super block (17):
plugin: format40
description: Disk-format plugin.
version: 1
magic: ReIsEr40FoRmAt
mkfs id: 0x14b9244f
flushes: 0
blocks: 85725440
free blocks: 57365574
root block: 28395039
tail policy: 0x2 (smart)
next oid: 0x10004
file count: 5
tree height: 3
key policy: LARGE

FS status block (21):
FS marked consistent
 
Old 03-05-2017, 01:29 AM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,129

Rep: Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121
Go get a gparted liveCD - will save you so much grief. They list support on their webpage.
 
Old 03-05-2017, 05:39 PM   #3
Glenn D.
Member
 
Registered: May 2009
Location: ACT - Australia
Distribution: Opensuse x86_64 (Latest)
Posts: 132

Original Poster
Rep: Reputation: 26
Hello,
gparted unable to shrink - truncate reiser4 partition according to

http://gparted.org/features.php

See Grow | Shrink columns

# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sdb2 311G 109G 203G 35% /media/disk2

what command or package to truncate the partition ?

Thanks
--Glenn

#
# cd /tmp
# umount /dev/sdb2

# measurefs.reiser4 /dev/sdb2 --tree-stat
measurefs.reiser4 1.1.0
Format release: 4.0.1
Copyright (C) 2001-2005 by Hans Reiser, licensing governed by reiser4progs/COPYING.

Tree statistics ... done
Packing statistics:
Formatted nodes: 4058.67b (99.09%)
Branch nodes: 350.00b (8.54%)
Twig nodes: 3836.00b (93.65%)
Leaf nodes: 4096.00b (100.00%)

Node statistics:
Total nodes: 28357207
Formatted nodes: 274
Unformatted nodes: 28356933
Branch nodes: 1
Twig nodes: 7
Leaf nodes: 28357199

Item statistics:
Total items: 586
Nodeptr items: 273
Statdata items: 5
Direntry items: 1
Tail items: 0
Extent items: 6

# measurefs.reiser4 /dev/sdb2 --tree-frag
measurefs.reiser4 1.1.0
Format release: 4.0.1
Copyright (C) 2001-2005 by Hans Reiser, licensing governed by reiser4progs/COPYING.

Tree fragmentation ... done
0.000032

# measurefs.reiser4 /dev/sdb2 --data-frag
measurefs.reiser4 1.1.0
Format release: 4.0.1
Copyright (C) 2001-2005 by Hans Reiser, licensing governed by reiser4progs/COPYING.

Data fragmentation ... done
0.002000
 
Old 03-05-2017, 07:33 PM   #4
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,780

Rep: Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212
OpenSUSE should have resize_reiserfs available.
 
Old 03-05-2017, 09:59 PM   #5
Glenn D.
Member
 
Registered: May 2009
Location: ACT - Australia
Distribution: Opensuse x86_64 (Latest)
Posts: 132

Original Poster
Rep: Reputation: 26
RE:OpenSUSE should have resize_reiserfs available.


Hello,
resize_reiserfs only runs against Reiser [ReiserFS] v3 partitions only. Not Reiser v4 partitions.

This is my understanding.

# question:
Who has a working knowledge of resize_reiserfs , reiser4 and programming experience to allow
reiser4 volumes to shrink or grow in space sizing ?

--Glenn


# man resize_reiserfs

NAME
resize_reiserfs - resizer tool for the ReiserFS filesystem

SYNOPSIS
resize_reiserfs [ -s [+|-]size[K|M|G] ] [ -j dev ] [ -fqv ] device

DESCRIPTION
The resize_reiserfs tool resizes an unmounted reiserfs file system.


other:
http://www.linuxfromscratch.org/blfs.../reiserfs.html
debugreiserfs

http://www.linuxfromscratch.org/blfs.../reiserfs.html
#
debugreiserfs

can sometimes help to solve problems with ReiserFS file systems. If it is called without options, it prints the super block of any ReiserFS file system found on the device.

mkreiserfs
creates a ReiserFS file system.

reiserfsck
is used to check or repair a ReiserFS file system.

reiserfstune
is used for tuning the ReiserFS journal. WARNING: Don't use this utility without first reading the man page thoroughly.

resize_reiserfs
is used to resize an unmounted ReiserFS file system.


https://build.opensuse.org/package/s...:42.2/reiserfs
https://build.opensuse.org/package/b...SUSE_Leap_42.2
https://build.opensuse.org/package/s...stems/reiserfs

#
https://build.opensuse.org/package/s...ctory/reiserfs

This package includes utilities for making the file system
(mkreiserfs), checking for consistency (reiserfsck), and resizing (resize_reiserfs).
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I find 'find last used block + 1' on a reiser4 partition and truncate it so I can use spare space for another partition type. ? Glenn D. Linux - Software 12 09-06-2016 08:36 AM
Are there any tools/code to list 'used blocks' on reiser4 volume ? [sdb] ? Glenn D. Linux - Software 1 08-28-2016 06:57 AM
LXer: Personalise the Past with these Excellent Open Source Tools LXer Syndicated Linux News 0 12-27-2015 01:10 PM
parted doesn't see display name when partition is reiser4 or btrfs robertjinx Linux - Software 2 08-08-2010 02:19 AM
Mounting Reiser4 partition takes about 5 seconds DX2 Linux - General 4 05-03-2005 06:55 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:34 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration